package Modele;

import java.awt.Image;

public class TypeChateau {

	private int type;
	private int couleur;
	private Image image;
	private static TypeChateau[] typeChateaux = new TypeChateau[4];
	private static int nbTypeChateaux = 0;
	
	public TypeChateau(int t, int c, Image img) {
		this.type = t;
		this.couleur = c;
		this.image = img;
		TypeChateau.typeChateaux[TypeChateau.nbTypeChateaux] = this;
		TypeChateau.nbTypeChateaux ++;
	}
	
	public static Image getImage(int type, int couleur) {
		int i;
		for (i = 0 ; i < TypeChateau.typeChateaux.length ; i ++) {
			if (TypeChateau.typeChateaux[i].type == type && TypeChateau.typeChateaux[i].couleur == couleur)
				break;
		}
		return TypeChateau.typeChateaux[i].image;
	}
	
}
